/*
* @Author: wanghongfucoder
* @Date:   2017-03-23 09:39:34
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-03-23 09:42:28
*/

public class CustomerFactory {
	public static final String[] names={"Rob","Joe","Julie"};

	public static AbstractCustomer getCustomer(String name){
		for (int i=0; i<names.length;i++ ) {
			if (names[i].equalsIgnoreCase(name)) {
				return new RealCustomer(name);
			}
		}
	 return new NullCustomer();
	}
}